<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/5/18
 * Time: 17:21
 */

namespace app\model;

use app\model\ApplyForSettled as ModelApplyForSettled;

class DepositReturnLog extends Common
{
    protected static $obj;

    public function _initialize()
    {
        parent::_initialize();
        $this->db_name = 'deposit_return_log';
    }

    /**
     * 类入口
     * @return DepositReturnLog
     */
    public static function getInstance()
    {
        if (is_null(self::$obj))
            self::$obj = new self();
        return self::$obj;
    }
    /*
     * 添加退款记录
     */
    public function returnLogAdd($enterNumber,$type){
        $data['map_id'] = ModelApplyForSettled::getInstance()->toValue(['enter_number'=>$enterNumber],'map_id');
        $data['type'] = $type;
        $data['about_id'] = ModelApplyForSettled::getInstance()->toValue(['enter_number'=>$enterNumber],'id');
        $data['enter_number'] = $enterNumber;
        $this->toAdd($data);

    }
}